package com.rockcent.mall.lib.repository;

import com.rockcent.mall.lib.domain.ShoppingCart;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * Created by zhangjh 2016/10/12.
 */
@Repository
public interface ShoppingCartRepository extends ShoppingCartRepositoryCustom, JpaRepository<ShoppingCart, Long>, JpaSpecificationExecutor {
    List<ShoppingCart> findByCustomerId(Long customerId);

    ShoppingCart findByCustomerIdAndProductId(Long customerId,Long productId);
}
